<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>CSS3瀑布流效果</title>
<style type="text/css">
/*大层*/
.container{
  width:1200px;margin: 0 auto;
}
/*瀑布流层*/
.waterfall{
  -moz-column-count:3;
  -webkit-column-count:3;
  column-count:3;
  -moz-column-gap: 9px;
  -webkit-column-gap: 9px;
  column-gap:9px;
  overflow: hidden;
}
/*一个内容层*/
.item{
  -moz-page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
}
.item img{
	width: 100%;
	border-radius: 6px; margin: 8px;
}
.item p{
  font-size: 14px; line-height: 22px;
  height: 44px;text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
</style>
</head>
<body>
<div class="container">
	<div class="waterfall">
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/wps77.png">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/wps87.png">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/4e94faf6567d40ef907439cc58f917ed.jpg">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/544fe59490b34499bb56e734742f6a5e.jpg">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/2103311741025694036.png">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/2104061818405403710.jpg?0.18797458698720648">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/0ea9e1503e064146b1ba97fc89d5a0fb.jpg">
			<p>文字，一些文字啊</p>
		</div>
		<div class="item">
			<img src="http://jnxcshiyan.jinan.cn/picture/0/ba8fea8895d5489d9b016995764adb45.jpg">
			<p>文字，一些文字啊</p>
		</div>
	</div>
</div>
</body>
</html>